<?php
class Model_LibraryAcl extends Zend_Acl{
    
    public function __construct() {
        $this->add(new Zend_Acl_Resource('authentication'));
        $this->add(new Zend_Acl_Resource('visiteur'));
        $this->add(new Zend_Acl_Resource('fraisforfait'));
        $this->add(new Zend_Acl_Resource('stats'));
        $this->add(new Zend_Acl_Resource('error'));
        
        $this->addRole(new Zend_Acl_Role('user'));
        $this->addRole(new Zend_Acl_Role('admin'),'user');
        
        $this->allow('user','authentication');
        $this->allow('user','error');
        
        $this->allow('user','visiteur','lister');
        $this->allow('admin','visiteur');
        
        $this->allow('user','fraisforfait','lister');
        $this->allow('admin','fraisforfait');
        
        $this->allow('user','stats','cumulvisiteur');
        $this->allow('admin','stats');
    }
}
?>
